<template>
  <view>
    <z-paging @pageScroll="pageScroll" ref="paging" :refresher-enabled="false">
      <v-headerview actionBarColor="#000000" :showBackIcon="true" :home="true">
        <!-- 星空背景 -->
        <ParticleBackground />

      </v-headerview>
    </z-paging>
    <custom-Tabbar @switchTabs="switchTabs" :tabbarId="tabbarId" />
    <view class="footer"></view>
  </view>

</template>

<script>
export default {
  components: {},
  data() {
    return {

      tabbarId: 1,//默认首页
      scrollTop: '',//距离顶部的距离
    };
  },

  onLoad(e) {

  },
  onShow() {

    uni.$emit("onPageScroll", 0)
  },
  methods: {
    // 监听滚动高度
    pageScroll(event) {
      uni.$emit("onPageScroll", event.detail.scrollTop)
    },
    // 自定义tabbar跳转
    switchTabs(item) {
      uni.$emit("onPageScroll", 0)
      this.tabbarId = 1
      uni.switchTab({
        url: item.pagePath
      })
    },
  }
};
</script>

<style lang="scss" scoped>
/deep/.zp-scroll-view-absolute {
  background-image: none !important;
  background-color: #000 !important;
}
</style>
